<?php


namespace App\Http\Requests\Admin\System;


use App\Http\Requests\BaseFormRequest;

class UserRechargeFormRequest extends BaseFormRequest
{
    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'money' => ['required','regex:/(^[1-9](\d*)?(\.\d{1,2})?$)|(^(0)$)|(^\d\.\d{1,2}?$)/']
        ];
    }

    public function attributes()
    {
        return [
            'money' => '充值金额',
        ];
    }
}